function Z = CalculateZ(v1,v2)

[n11,n12]=size(v1);
[n21,n22]=size(v2);
% v1=v1(1:len,1:len);
% v2=v2(1:len,1:len);
Z=zeros(n11,n21);
for i=1:n11
    for j=1:n21
        Z(i,j)=norm(v1(i,:)-v2(j,:))^2;
    end
end

